<%-- 
    Document   : ThemTinTucContent
    Created on : Nov 4, 2011, 2:48:42 PM
    Author     : kijoo
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<style type="text/css">
    <!--
    .style1 {color: #000000}
    -->
</style>
<div class="tieude">Thêm bản tin</div>
<div align="center">
    <form action="ThemTinTucController?Action=Insert" method="post" enctype="multipart/form-data" name="form1" id="them"  onSubmit="return kiemtra()">
        <table width="505" height="139" align="center">
            <tr>
              <td width="161" height="29">Mã bản tin</td>
              <td width="332"><label>
                <input type="text" name="idtin">
              </label></td>
            </tr>
            <tr>
              <td height="29">Tên bản tin</td>
              <td><input type="text" name="ten"></td>
            </tr>
            <tr>
              <td height="29">Hình </td>
              <td><label>
                <input type="file" name="hinh">
              </label></td>
            </tr>
            <tr>
              <td height="29">Tóm tắt</td>
              <td><input type="text" name="tomtat"></td>
            </tr>
            <tr>
              <td height="29">Nội dung </td>
              <td><input type="text" name="noidung"></td>
            </tr>
            <tr>
              <td height="29">Ghi chú</td>
              <td><input type="text" name="ghichu"></td>
            </tr>


            <tr>
            <td colspan="2"><div align="center">
                    <input type="submit" name="Them" id="Them" value="Thêm" style="background-color:#FFFF66">
                    <input type="hidden" name="Action" value="Insert"/>
                </div></td>
            </tr>
      </table>
    </form>
</div>
<script language="JavaScript">
    function kiemtra()
    {
        form1=document.getElementById("them");
        if(form1.idtin.value=="")
        {
            alert("Chưa nhập mã bản tin"); form1.idtin.focus(); return false; 
        }
        if(form1.ten.value=="")
        {
            alert("Chưa nhập tên bản tin"); form1.ten.focus(); return false; 
        }
        if(form1.tomtat.value=="")
        {
            alert("Chưa nhập tóm tắt bản tin"); form1.tomtat.focus(); return false; 
        }
		if(form1.noidung.value=="")
        {
            alert("Chưa nhập nội dung bản tin"); form1.noidung.focus(); return false; 
        }
		if(form1.ghichu.value=="")
        {
            alert("Chưa nhập ghi chú bản tin"); form1.ghichu.focus(); return false; 
        }
        return true;
    }
</script> 

